package com.jwsoft.manager.core.task.jhjy;

import com.alibaba.fastjson.JSON;
import com.jwsoft.manager.common.vo.common.AreaControlVO;
import com.jwsoft.manager.core.integration.EduDyjyQuerySyncIntegration;
import com.jwsoft.manager.core.integration.EduJhjyQuerySyncIntegration;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 金华录取查询
 *
 * @author chenzh
 */
@Component
@Slf4j
public class QueryTaskJob {
    @Autowired
    EduDyjyQuerySyncIntegration eduDyjyQuerySyncIntegration;

    @XxlJob("queryJhjyLqqkData")
    public void sjgxCBJobHandler() {
        XxlJobHelper.log("XXL-JOB, queryJhjyLqqkData");
        String str = XxlJobHelper.getJobParam();
        AreaControlVO vo = JSON.parseObject(str, AreaControlVO.class);
        ;
        log.info("金华教育录取情况查询开始");
        eduDyjyQuerySyncIntegration.createJhjySync(vo);
        log.info("金华教育录取情况查询结束");
    }
}
